import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login/Login.vue'
import Layout from '../views/Layout/Layout.vue'
import Home from '../views/Layout/home/home.vue'
import My from '../views/Layout/my/my.vue'
import Qa from '../views/Layout/qa/qa.vue'
import Video from '../views/Layout/video/video.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/',
    name: 'layout',
    component: Layout,
    children: [
      {
        path: '',
        name: 'home',
        component: Home
      },
      {
        path: '/my',
        name: 'my',
        component: My
      },
      {
        path: '/qa',
        name: 'qa',
        component: Qa
      },
      {
        path: '/video',
        name: 'video',
        component: Video
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
